

public class ChessPoint {
	public int row;
	public int col;
	public int color;
	public ChessPoint(int row, int col, int color) {
		this.row = row;
		this.col = col;
		this.color = color;
	}
	@Override
	public String toString() {
		return "Point:"+row+","+col+","+color;
	}
	@Override
	public int hashCode() {
		final int PRIME = 31;
		int result = 1;
		result = PRIME * result + col;
		result = PRIME * result + color;
		result = PRIME * result + row;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final ChessPoint other = (ChessPoint) obj;
		if (col != other.col)
			return false;
		if (color != other.color)
			return false;
		if (row != other.row)
			return false;
		return true;
	}
	
}
